package dubbo.cn.com;

import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import demo.DemoService;
import demo.User;


public class ConsomerMain {
  
  DemoService demoService;
  public static void main(String[] args) {
    ClassPathXmlApplicationContext context =
        new ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"});
    context.start();
    DemoService service = (DemoService) context.getBean("demoService");
    String say = service.sayHello("tom");
    System.err.println("   retru result     " + say);
    List<User> list = service.getUser();
    for (User u : list) {
      System.out.println(u.getName() + "         " + u.getAddress() + "          " + u.getAge());
    }
  }
}
